package cn.zl.springbootmqtt.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.util.Date;

/**
 * @Description:
 * @Author: zllwsy
 * @Date: 2020/10/28 10:43
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
@Accessors(chain = true)
@TableName("wk_well_cover_survey")
@ApiModel("井盖状态检测表")
public class DeviceStatus {
    @ApiModelProperty(value = "主键")
//    @TableId(value = "ID",type = IdType.AUTO)
    @TableField(value = "ID")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Id
    private Long id;

    @ApiModelProperty("井盖编号")
    @TableField(value = "WWCS_DEVICE_CODE")
    private String wwcsDeviceCode;

    @ApiModelProperty("井盖状态")
    @TableField(value = "WWCS_DEVICE_STATUS")
    private String wwcsDeviceStatus;

    @ApiModelProperty("电池电量")
    @TableField(value = "WWCS_BATTERY_LEVEL")
    private Double wwcsBatteryLevel;

    @ApiModelProperty("上传时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")//入参格式化
    @JsonFormat(locale="zh", pattern="yyyy-MM-dd")//出参格式化
    @TableField(value = "WWCS_UPLOAD_TIME")
    private Date wwcsUploadTime;
}
